home *** CD-ROM | disk | FTP | other *** search
- package java.io;
-
- public class FileOutputStream extends OutputStream {
- // $FF: renamed from: fd java.io.FileDescriptor
- private FileDescriptor field_0;
-
- public FileOutputStream(String var1) throws IOException {
- SecurityManager var2 = System.security;
- if (var2 != null) {
- var2.checkWrite(var1);
- }
-
- try {
- this.field_0 = new FileDescriptor();
- this.open(var1);
- } catch (IOException var3) {
- throw new FileNotFoundException(var1);
- }
- }
-
- public FileOutputStream(File var1) throws IOException {
- this(var1.getPath());
- }
-
- public FileOutputStream(FileDescriptor var1) {
- SecurityManager var2 = System.security;
- if (var2 != null) {
- var2.checkWrite(var1);
- }
-
- this.field_0 = var1;
- }
-
- private native void open(String var1) throws IOException;
-
- public native void write(int var1) throws IOException;
-
- private native void writeBytes(byte[] var1, int var2, int var3) throws IOException;
-
- public void write(byte[] var1) throws IOException {
- this.writeBytes(var1, 0, var1.length);
- }
-
- public void write(byte[] var1, int var2, int var3) throws IOException {
- this.writeBytes(var1, var2, var3);
- }
-
- public native void close() throws IOException;
-
- public final FileDescriptor getFD() throws IOException {
- if (this.field_0 != null) {
- return this.field_0;
- } else {
- throw new IOException();
- }
- }
-
- protected void finalize() throws IOException {
- if (this.field_0 != null) {
- this.close();
- }
-
- }
- }
-